package main

import "fmt"

func main()  {
	var t Train
	t.Car1.name = "train1"
	t.Car1.age = 100

	t.Car2.name = "train2"
	t.Car2.agr = 200

	fmt.Println(t)
}

type Car1 struct{
	name string
	age int
}

type Car2 struct{
	name string
	agr int
}

type Train struct{
	Car1
	Car2
}


